package com.shenw.frame;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class CommandCenter {

	int step;
	Logger logger = LoggerFactory.getLogger(CommandCenter.class);
	private static CommandCenter instance = new CommandCenter();
	private String wishInput;
	
	private CommandCenter() {}
	
	public static CommandCenter getInstance() {
		return instance;
	}
	
	public void write(String str) {
		logger.info(str);
	}
	
	public void start() throws IOException {
		
		step = 1;
		
		BufferedReader bis = new BufferedReader(new InputStreamReader(System.in));
		String line;
		while ((line = bis.readLine()) != null) {
			line = line.toLowerCase();
			if ("exit".equals(line)) {
				exit();
			} else if (line.matches(wishInput)) {
				
			}
		}
	}

	public String getWishInput() {
		return wishInput;
	}

	public void setWishInput(String wishInput) {
		this.wishInput = wishInput;
	}
	
	private void printWelcome() {
		// TODO
	}
	
	private void chooseModel() {
		// TODO
	}
	
	private void choosePackage() {
		// TODO
	}
	
	private void cards() {
		// TODO
	}
	
	private void summary() {
		// TODO
	}
	
	protected void exit() {
		write("Bye.");
		Main.exit();
	}
}
